<!DOCTYPE html>
<HTML>
<HEAD><meta name="viewport" content="width=device-width, initial-scale=1">
<Title>ChartViewer.updateViewPort</Title>
<link type='text/css' rel='Stylesheet' href="maxchartapi.css" />
</HEAD>
<body bgcolor="#FFFFFF" text="#000000" topmargin="0" leftmargin="0" rightmargin="0" marginwidth="0" marginheight="0">

<p class="heading0">ChartDirector 7.0 (Java Edition)</p>
<p class="heading1"><a href="ChartViewer.htm">ChartViewer</a>.<wbr>updateViewPort</p>
<hr class="separator">
<p class="heading2a">Usage</p>
<div class="content">
public void updateViewPort(boolean needUpdateChart, boolean needUpdateImageMap)
</div>
<p class="heading2">Description</p>
<div class="content">
Triggers the ViewPortChanged event.<br><br>
ChartViewer may fire ViewPortChanged events when the mouse clicks or drags on the plot area (see <a href="ChartViewer.setMouseUsage.htm">ChartViewer.setMouseUsage</a>). ChartViewer also allows external objects (such as scroll bars, navigation buttons, timers, etc) to modify the viewport. This method allows external objects to request ChartViewer to fire ViewPortChanged events.<br><br>
Many controls are able to update the viewport continuously as they are used. For example, a scroll bar may update the viewport continuously as the mouse drags on it. For these cases, the chart display may be updated continuously as the viewport changes. However, the image map does not need to update until the scrolling is completed (when the mouse button is released on the scroll bar and the mouse moves over the chart surface).<br><br>
The <b>needUpdateChart</b> argument and <b>needUpdateImageMap</b> argument allows one to specify if the event requires a chart update, and/or an image map update.<br><br>
For charts with a lot of hot spots and tool tips, the CPU power needed to handle the image map may not be negligible. Removing unnecessary image map updates may increase the update rate when the chart is being updated continuously.
</div>
<p class="heading2">Arguments</p>
<div class="content">
<div style="width:100%;box-sizing:border-box;">
<table border="1" cellpadding="5" cellspacing="0" width="100%"> 
<tr>
<th width="19%">Argument</th><th width="19%">Default</th><th>Description</th>
</tr>
<tr>
<td>needUpdateChart</td><td>(Mandatory)</td><td>A boolean value to indicate if the chart needs to be updated.</td></tr><tr><td>needUpdateImageMap</td><td>(Mandatory)</td><td>A boolean value to indicate if the image map needs to be updated.</td>
</tr>
</table>
</div>
</div>
<p class="heading2">Return Value</p>
<div class="content">
None
</div>
<br><hr class="separator">
<div class="copyright">&copy; 2022 Advanced Software Engineering Limited. All rights reserved.</div>
</body>
</HTML>
